import service from "../index";

export const getAllCollect = async () => {
  return await service({
    method: "get",
    url: "/collect/getAllCollect",
  });
};

//删除
export const deleteCollect = async (id: number) => {
  return await service({
    method: "post",
    url: "/collect/deleteCollect",
    data: { id: id },
  });
};
//批量删除
export const batchDeleteCollect = async (ids: any) => {
  return await service({
    method: "post",
    url: "/collect/batchDeleteCollect",
    data: { ids: ids },
  });
};

//新增
export const addCollect = async (params: any) => {
  return await service({
    method: "post",
    url: "/collect/addCollect",
    data: params,
  });
};

//搜索
export const searchCollect = async (params: any) => {
  return await service({
    method: "post",
    url: "/collect/searchCollect",
    data: params,
  });
};
